package com.zdb.common;

import lombok.Data;

@Data
public class Result {
    private Integer code;
    private String message;
    private Object data;

    public Result() {
    }

    public Result(Integer code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public static Result sucess(){
        return new Result(Constant.SAFE_CODE,"操作成功",null);
    }
    public static Result sucess(String message,Object data){
        return new Result(Constant.SAFE_CODE,"操作成功",data);
    }
    public static Result sucess(Integer code,String message){
        return new Result(code,message,null);
    }
    public static Result sucess(String message){
        return new Result(Constant.SAFE_CODE,message,null);
    }

}
